package com.ijiuchuang.jc_localization.bean.lite;

import com.litesuits.orm.db.annotation.Column;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;

/**
 * 设置 以键值对保存
 * Created by Administrator on 2016/5/9.
 */
@Table("Setts")
public class Setts extends BaseModel {

    // 设置
    public static final String SETTINGS_HOME_BANNER_MODE = "settings.home.BANNER_MODE";
    public static final String SETTINGS_MAP_SCENE = "settings.map.MAP_SCENE";

    public static final String COL_KEY = "key";
    public static final String COL_VALUE_STR = "valueStr";
    public static final String COL_VALUE_BOOL = "valueBool";
    public static final String COL_VALUE_NUM = "valueNum";
    public static final String COL_VALUE_INT = "valueInt";
    public static final String COL_VALUE_LONG = "valueLong";

    @PrimaryKey(AssignType.BY_MYSELF)
    @Column(COL_KEY)
    private String key;

    @Column(COL_VALUE_STR)
    private String valueStr;
    @Column(COL_VALUE_BOOL)
    private Boolean valueBool;
    @Column(COL_VALUE_NUM)
    private Number valueNum;
    @Column(COL_VALUE_INT)
    private int valueInt;
    @Column(COL_VALUE_LONG)
    private long valueLong;

    public Setts(String key) {
        this.key = key;
    }

    public Setts(String key, String valueStr) {
        this.key = key;
        this.valueStr = valueStr;
    }

    public Setts(String key, Boolean valueBool) {
        this.key = key;
        this.valueBool = valueBool;
    }

    public Setts(String key, int valueInt) {
        this.key = key;
        this.valueInt = valueInt;
    }

    public Setts(String key, long valueLong) {
        this.key = key;
        this.valueLong = valueLong;
    }

    @Override
    public String toString() {
        // 只打印出不为空的 value
        return "Setts{" +
                " key='" + key + '\'' +
                " valueStr = " + valueStr +
                " boolean = " + valueBool +
                " valueNum = " + valueNum +
                " valueInt = " + valueInt +
                " valueLong = " + valueLong +
                "} " + super.toString() + "\n";
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValueStr() {
        return valueStr;
    }

    public void setValueStr(String valueStr) {
        this.valueStr = valueStr;
    }

    public Boolean getValueBool() {
        return valueBool;
    }

    public void setValueBool(Boolean valueBool) {
        this.valueBool = valueBool;
    }

    public Number getValueNum() {
        return valueNum;
    }

    public void setValueNum(Number valueNum) {
        this.valueNum = valueNum;
    }

    public int getValueInt() {
        return valueInt;
    }

    public void setValueInt(int valueInt) {
        this.valueInt = valueInt;
    }

    public long getValueLong() {
        return valueLong;
    }

    public void setValueLong(long valueLong) {
        this.valueLong = valueLong;
    }
}
